<template>
  <div>
    <h2><slot name="title" ></slot></h2>
      <table border="1">
          <thead>
              <tr>
                  <th>编号</th>
                  <th>资产名称</th>
                  <th>价格</th>
                  <th>创建时间</th>
                  <th>操作</th>
              </tr>
          </thead>
          <thead>
              <tr v-for="(item,index) in list" :key="item.id">
                 <td>
                    <slot name="index" :index="index">
                    {{index}}
                    </slot>
                    </td>
                  <td>
                  <slot name="name1" :name1="item.name">
                     {{item.name}}
                     </slot>
                    </td>
                  <td>
                 <slot name="price" :price="item.price">
                     {{item.price}}
                     </slot>
                    </td>
                  <td>
                    <slot name="time" :time="item.time">
                      {{item.time}}
                    </slot>
                    </td>
                    <td><slot name="del" >
              </slot>
                    </td>
              </tr>
          </thead>
      </table>
  </div>
</template>

<script>
export default {
  data () {
    return {
      list: [
        { id: 100, name: '外套', price: 199, time: new Date('2010-08-12') },
        { id: 101, name: '裤子', price: 34, time: new Date('2013-09-01') },
        { id: 102, name: '鞋', price: 25.4, time: new Date('2018-11-22') },
        { id: 103, name: '头发', price: 19900, time: new Date('2020-12-12') }
      ]
    }
  },

  created () {

  },

  methods: {

  }
}
</script>

<style scoped lang='less'>

</style>
